/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.math.view.action;

import java.util.ResourceBundle;
import javax.swing.AbstractAction;
import javax.swing.Action;
import org.game.math.config.Configure;

/**
 *
 * @author nmduc
 */
public abstract class AbstractToggleAction extends AbstractAction {

    private static ResourceBundle resourceBundle =
            ResourceBundle.getBundle("org.game.math.view.action.AbstractToggleAction");

    public AbstractToggleAction(String name, Configure configure) {
        super(name);
    }

    protected boolean isSelected() {
        return Boolean.TRUE.equals(this.getValue(Action.SELECTED_KEY));
    }

    protected void setSelected(boolean isSelected) {
        super.putValue(Action.SELECTED_KEY, isSelected);
    }

    protected static ResourceBundle getResourceBundle() {
        return resourceBundle;
    }
}
